﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SiteAgle.Models;

namespace SiteAgle.ViewHelper
{
    public class UserHelper
    {
        public static Usuario user
        {
            set {
                HttpContext.Current.Session["user"] = value;
            }
            get {
                return (Usuario)HttpContext.Current.Session["user"];
            }
        }

        public static Boolean IsLoggedIn
        {
            get
            {
                if (user != null)
                {
                    return true;
                }
                return false;
            }
        }
        public static Projeto ProjetoCurrent
        {
            set
            {
                HttpContext.Current.Session["projeto"] = value;
            }
            get
            {
                return (Projeto)HttpContext.Current.Session["projeto"];
            }
        }

    }
}